//
//  ZXXStatusCell.swift
//  M-Weibo
//
//  Created by ZXX on 16/4/22.
//  Copyright © 2016年 ZXX. All rights reserved.
//

import UIKit

class ZXXStatusCell: UITableViewCell {

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
//        设置视图
        setupUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
///    设置视图
    private func setupUI(){
        backgroundColor = ThemeColor
        
//        添加控件到父控件
        contentView.addSubview(originalView)
//        添加约束
        originalView.snp_makeConstraints { (make) -> Void in
            make.top.equalTo(contentView).offset(8)
            make.leading.trailing.equalTo(contentView)
            make.height.equalTo(100)
        }
        
        
        contentView.snp_makeConstraints { (make) -> Void in
            make.top.leading.trailing.equalTo(self)
            make.bottom.equalTo(originalView)
            
        }
        
    }
    
//    MARK: -  懒加载控件
    private lazy var originalView: ZXXOriginalView = ZXXOriginalView()
    
    override func setSelected(selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
